n=int(input())
# input("请输入您要极端第几个三截形数：",n)
triangular=0
for i in range (1,n+1):
    triangular += i
print(triangular)
sum=n*(n-1)/2
if(triangular==sum):
    print("循环正确")
